<ui:composition template="/WEB-INF/template/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="main">
		<div class="jumbotron" style="margin-bottom: 50px;">
			<h:form>
				<h:dataTable class="table table-striped" id="table-form"
					value="#{eventoBean.eventosAdmin}" var="evento"
					emptyMessage="Nenhum evento disponível">
					<h:column>
						<f:facet name="header">Evento</f:facet>
						<h:outputText value="#{evento.sigla}" />
					</h:column>
					<h:column>
						<f:facet name="header">Início do evento</f:facet>
						<h:outputText value="#{evento.inicio}">
							<f:convertDateTime pattern="dd/MM/yyyy" />
						</h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header">Fim do evento</f:facet>
						<h:outputText value="#{evento.fim}">
							<f:convertDateTime pattern="dd/MM/yyyy" />
						</h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header">Atividades</f:facet>
						<a data-toggle="modal" href="#modalAtividade">Cadastrar/Visualizar</a>
					</h:column>
					<h:column>
						<a href="criarEvento.xhtml">Editar</a>
					</h:column>
					<h:column>
						<a data-toggle="modal" href="#modalExcluir">Excluir</a>
					</h:column>
				</h:dataTable>
			</h:form>
		</div>

		<div class="modal fade" id="modalAtividade" tabindex="-1"
			role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">Seven</button>
						<h4 class="modal-title">Cadastrar nova atividade!</h4>
					</div>
					<h:form>
						<div class="modal-body">Atividades cadastradas</div>
						<div class="modal-footer">
							<a type="button" class="btn btn-primary"
								href="criarAtividade.xhtml">Cadastrar nova atividade</a>
							<button type="button" class="btn btn-default"
								data-dismiss="modal">Fechar</button>
						</div>
					</h:form>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal-dialog -->
		</div>

	</ui:define>

</ui:composition>